<template>
  <div id="app">
    <router-view v-wechat-title="$route.meta.title"></router-view>
  </div>
</template>

<script>
  export default {
    name: 'app',
    created() {
      if (!this.$store.getters.isLogin && sessionStorage.user) {
        this.$store.dispatch('refreshToken');
        this.$store.commit("set_user", JSON.parse(sessionStorage.user));
      }
    }
  };
</script>

<style lang="less">
  @import url('./style/reset.less');
  @import url('./style/global.less');

  #app {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    // background: #34495e;
  }

  .iconfont {
    font-size: inherit;
  }
</style>
